[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr(...
authorPetr Viktorin <encukou@gmail.com>
Fri, 6 Sep 2024 11:13:54 +0000 (13:13 +0200)
committerArnaud Rebillout <arnaudr@debian.org>
Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)
commitb9a4c0b9b5012928fe3bc456b6257a6961c24be9
treec9cd8c1837375f37f7649a0b3593c34a2f4d095e
parentf01d93a84be47b550d99f78e43dc8a34baefb56d
[3.9] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123769)

Detect email address parsing errors and return empty tuple to
indicate the parsing error (old API). Add an optional 'strict'
parameter to getaddresses() and parseaddr() functions. Patch by
Thomas Dwyer.

(cherry picked from commit 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-Authored-By: Thomas Dwyer <github@tomd.tel>
Gbp-Pq: Name 0015-3.9-CVE-2023-27043-gh-102988-Reject-malformed-addres.patch
Doc/library/email.utils.rst
Lib/email/utils.py
Lib/test/test_email/test_email.py